/*
性格行为配置
skillper 技能释放概率
runper   逃跑血量比例
dq       可以盗窃
qz       可以敲诈
sh       可以索贿
*/
window._CHARACTER = {
    //不会跑	
	'冷静':{skillper:1,runper:0,sh:1,attr:null},
	'果敢':{attack:1,skillper:0.5,runper:0,dq:1,attr:{superAttack:30}},	
    '莽撞':{skillper:0,runper:0,dq:1,attr:{damagePlus:30,hit:-20}},
	
    //概率跑
    '理智':{skillper:0.5,runper:0.3,qz:1,attr:{hit:30}},	
    '稳重':{skillper:0.3,runper:0.1,sh:1,attr:{damageReduce:30}},
    '谨慎':{skillper:1,runper:0.5,sh:1,attr:{maxHpPer:30}},

    //只会跑	
    '胆小':{skillper:0.5,runper:0.99,qz:1,attr:{damagePlus:-30,speed:10}},	
}

window._CHARACTERHELPER = {

    _ALLCHA:null,

    getAttrOfCha:function(cha){

        if(_CHARACTER[cha]){
            return _CHARACTER[cha].attr;
        }  

        return null;
    },

    getDesOfCha:function(cha){

        if(_CHARACTER[cha]){
            var config = _CHARACTER[cha];
            var result ="性格:"+cha+"\n";
            result+="逃跑血量:"+config.runper+"\n";
            result+="施法概率:"+config.skillper+"\n";
            if(config.attr)
            result+=_IOF.getAttrString(config.attr);
            return result;
        }

        return "";

    },

    getAllCha:function(){

        if(!_CHARACTERHELPER._ALLCHA){
            _CHARACTERHELPER._ALLCHA=[];
        }
        for(var key in _CHARACTER){
            _CHARACTERHELPER._ALLCHA.push(key);
        }
        return  _CHARACTERHELPER._ALLCHA;
    }

}